package com.dragon.modules.yuegou.query.lot;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.lot.ActivityDetailEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 抽奖活动参与信息表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-10-24 10:22:55
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class ActivityDetailQuery extends ActivityDetailEntity implements Query<ActivityDetailEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员参与人数查询条件 */
	@JsonUnwrapped(prefix = "joinMemberNum")
	private Condition<Integer> joinMemberNumCondition;

    /** 分享人数查询条件 */
	@JsonUnwrapped(prefix = "shareNum")
	private Condition<Integer> shareNumCondition;

    /** 查看数量查询条件 */
	@JsonUnwrapped(prefix = "viewNum")
	private Condition<Integer> viewNumCondition;

    /** 奖券数量查询条件 */
	@JsonUnwrapped(prefix = "ticketNum")
	private Condition<Integer> ticketNumCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public ActivityDetailQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public ActivityDetailQuery(ActivityDetailEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public ActivityDetailQuery(ActivityDetailQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.joinMemberNumCondition != null) {
			this.joinMemberNumCondition = other.joinMemberNumCondition.copy();
		}
		if(other.shareNumCondition != null) {
			this.shareNumCondition = other.shareNumCondition.copy();
		}
		if(other.viewNumCondition != null) {
			this.viewNumCondition = other.viewNumCondition.copy();
		}
		if(other.ticketNumCondition != null) {
			this.ticketNumCondition = other.ticketNumCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<ActivityDetailEntity> toQueryWrapper() {
		QueryWrapper<ActivityDetailEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (joinMemberNumCondition != null) {
			joinMemberNumCondition.toWrapper(wrapper, COL_JOIN_MEMBER_NUM);
		}
		if (shareNumCondition != null) {
			shareNumCondition.toWrapper(wrapper, COL_SHARE_NUM);
		}
		if (viewNumCondition != null) {
			viewNumCondition.toWrapper(wrapper, COL_VIEW_NUM);
		}
		if (ticketNumCondition != null) {
			ticketNumCondition.toWrapper(wrapper, COL_TICKET_NUM);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员参与人数查询条件
	 * 
	 * @return joinMemberNumCondition 会员参与人数查询条件
	 */
	public Condition<Integer> joinMemberNum() {
		this.joinMemberNumCondition = new Condition<>();
		return this.joinMemberNumCondition;
	}
	
	/**
	 * 获取会员参与人数查询条件
	 * 
	 * @return joinMemberNumCondition 会员参与人数查询条件
	 */
	public Condition<Integer> getJoinMemberNumCondition() {
		return joinMemberNumCondition;
	}

	/**
	 * 设置会员参与人数查询条件
	 * 
	 * @param joinMemberNumCondition 会员参与人数查询条件
	 */
	public void setJoinMemberNumCondition(Condition<Integer> joinMemberNumCondition) {
		this.joinMemberNumCondition = joinMemberNumCondition;
	}

	/**
	 * 构造并返回分享人数查询条件
	 * 
	 * @return shareNumCondition 分享人数查询条件
	 */
	public Condition<Integer> shareNum() {
		this.shareNumCondition = new Condition<>();
		return this.shareNumCondition;
	}
	
	/**
	 * 获取分享人数查询条件
	 * 
	 * @return shareNumCondition 分享人数查询条件
	 */
	public Condition<Integer> getShareNumCondition() {
		return shareNumCondition;
	}

	/**
	 * 设置分享人数查询条件
	 * 
	 * @param shareNumCondition 分享人数查询条件
	 */
	public void setShareNumCondition(Condition<Integer> shareNumCondition) {
		this.shareNumCondition = shareNumCondition;
	}

	/**
	 * 构造并返回查看数量查询条件
	 * 
	 * @return viewNumCondition 查看数量查询条件
	 */
	public Condition<Integer> viewNum() {
		this.viewNumCondition = new Condition<>();
		return this.viewNumCondition;
	}
	
	/**
	 * 获取查看数量查询条件
	 * 
	 * @return viewNumCondition 查看数量查询条件
	 */
	public Condition<Integer> getViewNumCondition() {
		return viewNumCondition;
	}

	/**
	 * 设置查看数量查询条件
	 * 
	 * @param viewNumCondition 查看数量查询条件
	 */
	public void setViewNumCondition(Condition<Integer> viewNumCondition) {
		this.viewNumCondition = viewNumCondition;
	}

	/**
	 * 构造并返回奖券数量查询条件
	 * 
	 * @return ticketNumCondition 奖券数量查询条件
	 */
	public Condition<Integer> ticketNum() {
		this.ticketNumCondition = new Condition<>();
		return this.ticketNumCondition;
	}
	
	/**
	 * 获取奖券数量查询条件
	 * 
	 * @return ticketNumCondition 奖券数量查询条件
	 */
	public Condition<Integer> getTicketNumCondition() {
		return ticketNumCondition;
	}

	/**
	 * 设置奖券数量查询条件
	 * 
	 * @param ticketNumCondition 奖券数量查询条件
	 */
	public void setTicketNumCondition(Condition<Integer> ticketNumCondition) {
		this.ticketNumCondition = ticketNumCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
